package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.body.AccountsCreateByThirdPartyUserIdParamBody;
import net.yondervision.hrfsp.sdk.esign.domain.response.AccountsCreateByThirdPartyUserIdResponse;

/**
 * 获取鉴权Token
 *
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/09/26 21:36
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class AccountsCreateByThirdPartyUserIdRequest
    extends AbstractESignRequest implements ESignRequest<AccountsCreateByThirdPartyUserIdResponse> {

  private AccountsCreateByThirdPartyUserIdParamBody accountsCreateByThirdPartyUserIdParamBody;

  public AccountsCreateByThirdPartyUserIdRequest(
      AccountsCreateByThirdPartyUserIdParamBody accountsCreateByThirdPartyUserIdParamBody) {
    this.accountsCreateByThirdPartyUserIdParamBody = accountsCreateByThirdPartyUserIdParamBody;
    this.setParamBody(accountsCreateByThirdPartyUserIdParamBody);
  }

  @Override
  public String getUrl() {
    return "/accounts/createByThirdPartyUserId";
  }

  @Override
  public Method getMethodType() {
    return Method.POST;
  }

  @Override
  public Class<AccountsCreateByThirdPartyUserIdResponse> getResponseClass() {
    return AccountsCreateByThirdPartyUserIdResponse.class;
  }

}
